﻿namespace BenjaminSchroeter.Dsl.UserRestrictions
{
    /// <summary>
    /// Adds a method to ModelElements to allow the UserRestrictionProvider
    /// to ask the ModelElement whenever a property is restricted.
    /// </summary>
    public interface ISupportsUserRestrictions
    {
        /// <summary>
        /// Gets the restriction for the given property.
        /// </summary>
        /// <remarks>
        /// This method is called only for properties that 
        /// are mentioned by the CustomRestrictedPropertyAttribute.
        /// </remarks>
        /// <param name="property">The property name as a string.</param>
        Restriction GetRestriction(string property);
    }
}
